package com.tarena.all;

public class Pi {
	public static void main(String[] args) {
		double pi = 0;
		int sgn = 1;
		for(int i = 1; i <= 900000000;i++){
			pi += sgn * 1.0 / (2 * i - 1);
			sgn *= (-1);
		}
		pi = pi * 4;
		System.out.println(pi);
	}
}	
